package cn.tedu.boot06.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BMIController {
    @RequestMapping("/bmi")
    public String bmi(double h,double w){
        double bmi = w/(h*h);
        if (bmi<18.5){
            return "兄弟你瘦了!";
        }
        if (bmi<22){
            return "身体健康!";
        }
        if (bmi<28){
            return "微微胖了";
        }
        return "有点儿胖了!";
    }
}
